<%inherit file="../body.mako"/>

${next.body()}

<%def name="menus()">
${parent.build_menus(selected="articles")}
</%def>

<%def name="build_sub_menus(selected)">
<%
menus = (
    ("new article", url("new_article"), "write an article"),
    ("manage articles", url("articles"), "manage articles"),
    ("moderate comments", url("comments"), "moderate comments"),
)
%>

<ul>
% for name, link, desc in menus:
  % if name == selected:
  <li id="${name.replace(' ', '-')}" class="selected"><a href="${link}" title="${_(desc)}">${name.capitalize()}</a></li>
  % else:
  <li id="${name.replace(' ', '-')}"><a href="${link}" title="${_(desc)}">${name.capitalize()}</a></li>
  % endif
% endfor
</ul>
</%def>
